// ignore_for_file: non_constant_identifier_names

import 'package:json_serializer/json_serializer.dart';

class ServiceFunction extends Serializable {
  final String command;

  ServiceFunction({required this.command});
  
  @override
  Map<String, dynamic> toMap() {
    return { 'Command': command };
  }
}

class EnrollIdentifierPayload {
  final String jwtFileName;

  final String jwtContent;

  EnrollIdentifierPayload(this.jwtFileName, this.jwtContent);
}

class EnrollIdentifierFunction extends ServiceFunction {
  final EnrollIdentifierPayload data;

  EnrollIdentifierFunction(this.data, {required super.command});
}

class SvcResponse {
  final int code;
  final String message;
  final String error;

  SvcResponse({required this.code, required this.message, required this.error});

    // override public string ToString()
    // {
    //     return $"Code: {Code}\nMessage: {Message}\nError: {Error}";
    // }
  @override
  String toString() {
    return 'Code: $code\nMessage: $message\nError: $error';
  }
}

class StatusEvent
{
  final String Op;

  StatusEvent({required this.Op});
}

class ZitiTunnelStatus extends SvcResponse {
  ZitiTunnelStatus({required super.code, required super.message, required super.error});
}